using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class education_informationMap : EntityTypeConfiguration<education_information>
    {
        public education_informationMap()
        {
            // Primary Key
            this.HasKey(t => t.education_information_id);

            // Properties
            this.Property(t => t.education_type)
                .HasMaxLength(20);

            this.Property(t => t.title)
                .HasMaxLength(200);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.update_by)
                .HasMaxLength(20);

            this.Property(t => t.publish_person)
                .HasMaxLength(100);

            this.Property(t => t.summary)
                .HasMaxLength(1000);

            // Table & Column Mappings
            this.ToTable("education_information");
            this.Property(t => t.education_information_id).HasColumnName("education_information_id");
            this.Property(t => t.education_type).HasColumnName("education_type");
            this.Property(t => t.title).HasColumnName("title");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.update_time).HasColumnName("update_time");
            this.Property(t => t.update_by).HasColumnName("update_by");
            this.Property(t => t.publish_date).HasColumnName("publish_date");
            this.Property(t => t.publish_person).HasColumnName("publish_person");
            this.Property(t => t.status).HasColumnName("status");
            this.Property(t => t.is_have_image).HasColumnName("is_have_image");
            this.Property(t => t.is_have_document).HasColumnName("is_have_document");
            this.Property(t => t.open_training_flag).HasColumnName("open_training_flag");
            this.Property(t => t.summary).HasColumnName("summary");
        }
    }
}
